@xaxxon: I take it to mean that the particular datagram sent with MSG_CONFIRM will not trigger the kernel to reprobe the destination address. Any datagrams sent to that same destination (by the same or other processes) without MSG_CONFIRM will trigger the kernel to reprobe the destination address (if the neighbor cache entry is stale).
Is there an issue with privileges in MSG_confirm?
So there is no issue with privileges; a process can't use MSG_CONFIRM to prevent other processes from triggering the kernel to reprobe any destination addresses; it can only waive that service for itself. This is my attempt at making sense of this after reading the other two answers here.
Is MSG_confirm only applicable for UDP sockets?
I inherited some socket code that uses MSG_CONFIRM as the flag in a send (). The man-page for send () seems to say that MSG_CONFIRM is only applicable for UDP sockets. This is an AF_UNIX socket using the TCP protocol. Without the MSG_CONFIRM flag I get "resource temporarily unavailable" on the send ().
When should I set the MSG_confirm flag?
You should only set the flag if the datagram you're sending is a direct response to a datagram you just received from the same peer. If you're sending an initial request, or sending a datagram in response to some other event (like user input, or a timeout) then you should not set the MSG_CONFIRM flag.